package com.future.bantang.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;

/**
 * Created by Administrator on 16-1-16.
 */
public class ScrollMonitorableScrollView extends ScrollView {
    public ScrollMonitorableScrollView(Context context) {
        super(context);
    }

    public ScrollMonitorableScrollView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }




    private boolean isIntercapt=true;
    //设置是否拦截
    public void setIsIntercapt(boolean isIntercapt) {
        this.isIntercapt = isIntercapt;
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return isIntercapt?super.onInterceptTouchEvent(ev):isIntercapt;
//        return false;
    }
}
